package clinic.ms.mapper;

import clinic.ms.entity.Home;
import clinic.ms.entity.Patient;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@Mapper
public interface PatientMapper {
    /*
    Patient queryPaByNo(@Param("patientNo") String patientNo);
    Patient queryPaByName(@Param("patientName") String patientName);

    int insertPatient(@Param("patient") Patient patient);
    int delete(@Param("patientNo") String patientNo);
    void update(Patient patient);
    List<Patient> findAll();
*/
    Patient queryPaByNo(@Param("patientNo") String patientNo);
    Patient queryPaByName(@Param("patientName") String patientName);

    void insertPatient(@Param("patient") Patient patient);
    void delete(String patientNo);
    void update(@Param("patient") Patient patient);
    List<Patient> findAll();

    Patient selectAllbyId(@Param("patientNo") String  patientNo);
    List<Patient> selectAllbyName(String patientName);


    int queryPaByMonth(@Param("time")String time);
}